package com.wzz.seckillone.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzz.seckillone.pojo.SeckillGoods;
import com.wzz.seckillone.vo.SeckillGoodsWh;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.*;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2021-11-08
 */
@Mapper
public interface SeckillGoodsMapper extends BaseMapper<SeckillGoods> {
    /**
     * @Method
     * @Author wzz
     * @Version  1.0
     * @Description 秒杀商品数量
     * @param
     * @Return
     * @Exception
     * @Date 2022/3/15 23:18
     */
    int findSeckillGoodsCount();

    /**
     * @Method
     * @Author wzz
     * @Version  1.0
     * @Description 分页查询 秒杀商品数据
     * @param
     * @Return
     * @Exception
     * @Date 2022/3/15 23:24
     */
    List<SeckillGoodsWh> getSeckillGoodsList(@Param("curPage") int curPage, @Param("perCount") int perCount, @Param("keyword") String keyword);

    SeckillGoods getSeckillGoodsByGoodsId(String goodsId);

    void updateOneCount(String goodsId);

    void updateSeckillGoodsCount(int i);
}
